/**
 * Shopware 4.0
 * Copyright © 2012 shopware AG
 *
 * According to our dual licensing model, this program can be used either
 * under the terms of the GNU Affero General Public License, version 3,
 * or under a proprietary license.
 *
 * The texts of the GNU Affero General Public License with an additional
 * permission and of our proprietary license can be found at and
 * in the LICENSE file you have received along with this program.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * "Shopware" is a registered trademark of shopware AG.
 * The licensing of the program under the AGPLv3 does not imply a
 * trademark license. Therefore any rights, title and interest in
 * our trademarks remain entirely with us.
 *
 * @category   Shopware
 * @package    Shopware_Styling
 * @subpackage Emotions
 * @copyright  Copyright (c) 2012, shopware AG (http://www.shopware.de)
 * @version    $Id$
 * @author shopware AG
 */
div[id^=emotion-components-banner-mapping] {
    .#{$prefix}search-article-live {
        .#{$prefix}form-item-hidden {
            margin: 0;
        }
        .#{$prefix}search-article-live-field {
            .#{$prefix}field-label-cell {
                width: 125px !important;
                font-weight: 700 !important;
            }

            .#{$prefix}form-item-body {
                display: block !important;
            }
            .#{$prefix}form-trigger-wrap {
                position: relative !important;
                right: 0;
                width: 212px;
                top: 3px;
            }

        }
    }
}

div[id^=emotion-main-window] {
	.#{$prefix}grid-header-ct {
		border-top: 0 none
	}
}


.#{$prefix}hub-library {
    @include border-radius(0 4px 4px 0);
    background: rgba(0, 0, 0, .6);
    top: -1px !important;
    border: 1px solid #414548;
    border-left: 0 none;


    .#{$prefix}panel-body {
        @include single-box-shadow(#000, 20px, 0, 20px, -20px, true);
        padding: 4px 14px 12px 20px;

        .#{$prefix}library-section-title {
            position: relative;
            color: #f2f2f2;
            text-shadow: 1px 1px 0 #000;
            border-bottom: 1px solid rgba(255, 255, 255, 0.25);

            .#{$prefix}library-section-inner-title {
                padding: 8px 0 4px;
                border-bottom: 1px solid rgba(0, 0, 0, 0.25);
            }

            .toggle {
                cursor: pointer;
                width: 9px;
                height: 9px;
                background: #f00;
                position: absolute;
                right: 0; top: 11px;
                background: url("") no-repeat;

                &.inactive {
                    background: url("") no-repeat;
                }
            }
        }

        .#{$prefix}library-inner-panel {
            padding: 8px 0 8px;
        }
    }
}

.#{$prefix}library-element {
    @include border-radius(3px);
    background: #fff url("") no-repeat 6px center;
    margin: 0 0 5px;
    font-size: 11px;
    padding: 0 8px 0 21px;
    line-height: 22px;
    color: $font-color;
    font-weight: bold;
    cursor: move;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    border: 1px solid transparent;
    -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
     -moz-transition: border linear 0.2s, box-shadow linear 0.2s;
     -ms-transition: border linear 0.2s, box-shadow linear 0.2s;
     -o-transition: border linear 0.2s, box-shadow linear 0.2s;
     transition: border linear 0.2s, box-shadow linear 0.2s;

    &:hover:not(.dragged) {
        @include box-shadow(inset 0 0 6px rgba(82, 168, 236, 0.85));
        border-color: rgba(82, 168, 236, 0.8);
        color: #2F79B1;
    }

    &.dragged {
        background: transparent;
        text-indent: -9999em;
        border: 1px dashed #999;
    }

    &:last-child {
        margin: 0;
    }
}

.#{$prefix}emotion-grid-outer-container {

    .#{$prefix}emotion-grid-inner-container {
        position: relative;
    }

    .#{$prefix}emotion-grid-first-layer {
        @include border-radius(4px);
        width: 100%;
        border: 1px solid #dce0e3;
        border-bottom: 0 none;
        border-right: 0 none;
        background: url("") repeat;
        position: relative;

        .#{$prefix}shopware-proxy-state-element {
            @include box-shadow(inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.9));
            position: absolute;
            border: 1px solid #86ccff;
            background: rgba(134, 204, 255, 0.08);
        }


        .row {
            border-bottom: 1px solid #dce0e3;

            &:first-child {
                @include border-radius(4px 4px 0 0);
                .col-last {
                    @include border-radius(0 4px 0 0);
                }
            }
        }
        .row-last {
            @include border-radius(0 0 4px 4px);
            .col:first-child {
                @include border-radius(0 0 0 4px);
            }
            .col-last {
                @include border-radius(0 0 4px 0);
            }
        }

        .col {
            float: left;
            border-right: 1px solid #dce0e3;
            height: 44px;
        }
    }

    .#{$prefix}emotion-grid-second-layer {
        position: absolute;
        left: 0; top: 0;
        width: 100%;
    }

    .#{$prefix}emotion-element {
        @include inner-border(1px 1px 1px 1px, #fff);
        border: 1px solid #bcd6eb;
        position: absolute;
        background: #e7f5ff;
        color: #2f79b1;
        text-align: left;
        text-shadow: 1px 1px 0 #fff;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        cursor: move;
		overflow: hidden;

		.#{$prefix}emotion-banner-preview {
			width: 100%;
			height: 100%;

			.#{$prefix}emotion-banner-image {
				@include opacity(0.2);
				max-width: 100%;
				display: block;
			}

			.#{$prefix}emotion-banner-preview-inner {
                background: svg-linear-gradient(0%, 0%, 100%, 0%, (
                                  svg-color-stop(rgba(231,245,255,1), 0%, 1),
                                  svg-color-stop(rgba(231,245,255,0.6), 20%, 0.6),
                                  svg-color-stop(rgba(255,255,255,0.01), 50%, 0.01),
                                  svg-color-stop(rgba(231,245,255,0.6), 80%, 0.6),
                                  svg-color-stop(rgba(231,245,255,1), 100%, 1)
                                )) center center no-repeat transparent;
				width: 100%;
				height: 100%;
				position: absolute;
				top: 0; left: 0;
			}
		}

        .#{$prefix}emotion-element-inner {
            padding: 0 0 0 18px;
			position: absolute;
			left: 0; top: 0;
			width: 65%;
			white-space: nowrap;
			overflow: hidden;
			text-overflow: ellipsis;
        }

		.#{$prefix}emotion-element-info {
			font-size: 11px;
			color: #667178;
			position: absolute;
			left: 16px;
			top: 15px;
			width: 65%;
			white-space: nowrap;
			overflow: hidden;
			text-overflow: ellipsis;
		}

        .#{$prefix}emotion-element-handle {
            position: absolute;
            background: url("") repeat-y;
            width: 7px;
            height: 17px;
            left: 8px; top: 50%;
            margin-top: -8px;
        }

        .#{$prefix}emotion-element-delete {
            height: 14px; width: 14px;
            background: url("") no-repeat;
            position: absolute;
            top: 50%; right: 8px;
            margin-top: -7px;
            cursor: pointer;
        }
		.#{$prefix}emotion-element-pencil {
			height: 16px; width: 16px;
			display: none;
			cursor: pointer;
			position: absolute;
			top: 50%; right: 25px;
			margin-top: -8px;
			background: url() no-repeat;
		}

		// State - Hover
		&:hover .#{$prefix}emotion-element-pencil {
			display: block;
		}

    }

    .listing-4col {
        .col {
            width: 25%;
        }

        // Width
        div[class^="col-1x"] {
            width: 25%;
        }
        div[class^="col-2x"] {
            width: 50%;
        }
        div[class^="col-3x"] {
            width: 75%;
        }
        div[class^="col-4x"] {
            width: 100%;
        }
    }

    .listing-3col {
        .col {
            width: 33.3333334%;
        }
        div[class^="col-1x"] {
            width: 33.3333333%;
        }
        div[class^="col-2x"] {
            width: 66.6666666%;
        }
        div[class^="col-3x"] {
            width: 100%;
        }
    }
    .listing-2col {
        .col {
            width: 50%;
        }
        div[class^="col-1x"] {
            width: 50%;
        }
        div[class^="col-2x"] {
            width: 100%;
        }
    }
    .listing-1col {
        .col {
            width: 100%;
        }
        div[class^="col-1x"] {
            width: 100%;
        }
    }
}

/** Custom dd proxy element */
.#{$prefix}shopware-dd-proxy {
    @include border-radius(3px);
    @include box-shadow(inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.9));
    border-color: rgba(82, 168, 236, 0.8);
    width: 175px !important;

    .#{$prefix}dd-drop-icon {
        display: none !important;
    }

    .#{$prefix}dd-drag-ghost {
        @include border-radius(3px);
        @include inner-border(1px 1px 1px 1px, #fff);
        @include opacity(1);
        border: 0 none !important;
        background: #e3f4ff !important;
        padding-left: 5px;

        & * {
            background-color: transparent;
        }

        .#{$prefix}library-element {
            text-shadow: 0 1px 0 #fff;
            color: #475c6a;
        }

        .#{$prefix}emotion-element {
            padding: 0;

            .#{$prefix}emotion-element-inner {
                padding: 0 0 0 18px;
                text-shadow: 0 1px 0 #fff;
                color: #475c6a;
                font-weight: bold;
            }

            .#{$prefix}emotion-element-handle {
                position: absolute;
                background: url("") repeat-y;
                width: 7px;
                height: 17px;
                left: 8px; top: 50%;
                margin-top: -8px;
            }
        }
    }
}